Add redirect from versioned link to stable - #489
Merged
Conversation
✅ Deploy Preview for stackable-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
fhennig
marked this pull request as ready for review
November 27, 2023 13:21
vsupalov
approved these changes
Nov 27, 2023
vsupalov
left a comment
Contributor
There was a problem hiding this comment.
Redirect results in 302s (moved temporarily), allows for stable external links to versions and otherwise should not interfere with existing content discoverability 👍 LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently there is no way to link to the latest version by its actual version number, which is annoying. There is only the 'stable' link (i.e. https://docs.stackable.tech/home/stable/concepts/product_image_selection). Previous versions are linkable by their version number (i.e. https://docs.stackable.tech/home/23.4/concepts/product_image_selection).
This PR adds a redirect from the actual version to 'stable'.
Why redirect from the number to stable, and not the other way round? Where do URLs actually end up? Users might send each other links, they are just used in the moment and then the URL doesn't really matter. For bookmarking a URL, sometimes bookmarking a link that always points to the latest docs might be better, sometimes you might want a stable link. Both are possible, just the default would be to link 'stable'. The main reason is SEO - Google will index the 'stable' links, and when we release a new version, the pages will update, instead of google having to find the new version number. If a new version is released, google will find the now latest-1 version on a new indexing run and will index it too, but it will also update the 'stable' pages.